feat(build): Build a single function#1146
Merged
sriram-mv merged 2 commits intoaws:developfrom Apr 24, 2019
Merged
Conversation
sriram-mv
suggested changes
Apr 23, 2019
| function_logical_id) | ||
|
|
||
| all_artifacts = set(os.listdir(str(resource_artifact_dir))) | ||
| print(all_artifacts) |
| "jinja2", | ||
| 'requirements.txt'} | ||
|
|
||
| def test_fucntion_not_found(self): |
|
|
||
| EXPECTED_FILES_GLOBAL_MANIFEST = set() | ||
| EXPECTED_FILES_PROJECT_MANIFEST = {'__init__.py', 'main.py', 'numpy', | ||
| # 'cryptography', |
Contributor
There was a problem hiding this comment.
why is cryptography commented out?
Contributor
Author
There was a problem hiding this comment.
This was copied from the above python tests.
This is the specific reason: https://github.com/awslabs/aws-sam-cli/blob/develop/tests/integration/testdata/buildcmd/Python/requirements.txt#L4
sriram-mv
approved these changes
Apr 24, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
N/A
Description of changes:
This enables a customer to build a single function similar to how they would invoke a single function. To build a single function, you can pass the LogicalID to the command
sam build <MyLogicalId>. If the LogicalID is omitted, the command will behave exactly how it does not and build the whole template.Concerns on approach:
This change enables a customer (or IDE) to quickly build a single function for faster test cycles. This could result in a deployment to of source code instead of built code, if the customer only builds one of the n number of functions in the template and then does a package and deploy. With this change, customers will need to still use
sam buildwithout the logicalId before package and deploying. This could create more customer confusion in the short term.Checklist:
make prpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.